<?php 
ini_set('date.timezone','Asia/Shanghai');
//error_reporting(E_ERROR);

require_once "WxpayAPI_php_v3/lib/WxPay.Api.php";
require_once "WxpayAPI_php_v3/example/WxPay.NativePay.php";
require_once 'WxpayAPI_php_v3/example/log.php';
//129648820120161130104654
//$_GET['out_trade_no'] = '129648820120161130104654';
if(empty($_GET['out_trade_no'])){
	exit("缺失参数");
}

$input = new WxPayOrderQuery();
$input->SetOut_trade_no($_GET['out_trade_no']);
$result = WxPayApi::orderQuery($input);

if(array_key_exists("return_code", $result)
			&& array_key_exists("result_code", $result)
			&& $result["return_code"] == "SUCCESS"
			&& $result["trade_state"] == "SUCCESS")
		{
			echo json_encode(array('success'=>true));
		}else{
			
			echo json_encode(array('success'=>false));
		}
		




?>